package com.shop.mms_client.viewmodel;

import android.app.Application;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.LiveData;
import com.shop.mms_client.model.Message;
import com.shop.mms_client.repository.MessageRepository;
import java.util.List;

public class MessageViewModel extends AndroidViewModel {
    private final MessageRepository repository;

    public MessageViewModel(Application application) {
        super(application);
        repository = MessageRepository.getInstance(application);
    }

    public LiveData<List<Message>> getAllMessages() {
        return repository.getAllMessages();
    }

    public LiveData<List<Message>> getSpamMessages() {
        return repository.getSpamMessages();
    }
} 